package org.example.draw;

import javax.swing.*;
import java.awt.*;

/**
 * @BelongsProject: javaFoundation
 * @BelongsPackage: org.example.draw
 * @Author: dtq
 * @CreateTime: 2023-10-18  16:33
 * @Description: TODO
 * @Version: 1.0
 */
public class JavaDraw extends  JFrame{

    //定义一个面板
    private huabi huabi = null;
    public static void main(String[] args) {
        new JavaDraw();
    }
    public JavaDraw(){
        huabi = new huabi();
        this.add(huabi);
        this.setSize(900,700);
        this.setVisible(true);
    }

}

class huabi extends JPanel {
    @Override
    public void paint(Graphics graphics) {
        super.paint(graphics);

        graphics.drawOval(10,10,300,300);
    }
}
